package com.street.controller.user;


import com.street.entity.Dish;
import com.street.result.Result;
import com.street.service.DishService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("user/dish")
public class DishController {
    @Autowired
    DishService dishService;

    @GetMapping("/{shopId}")
    public Result<List<Dish>> listDish(@PathVariable Integer shopId){
        List<Dish> list=dishService.listDish(shopId);
        return Result.success(list);
    }
}
